Subscribe Us

Responsive Advertisement

Advertisement

URI Online Judge | 1397 Game of The Greatest solution in cpp

 URI Online Judge | 1397 Game of The Greatest solution in cpp,uri 1397 solution in cpp,AD-HOC ,Uri online judge, c++,cpp,uri solution,cpp solution, c++ solution,uri,solution,programming solution

uri 1397 solution in cpp

by ujjal roy



#include<bits/stdc++.h>

using namespace std;

main()

{

    int n,a,b,c1,c2;

    while(1)

    { c1=0;

    c2=0;

        cin>>n;

       if(n==0) break;

        while(n--)

        {

             cin>>a>>b;

             if(a>b) c1++;

             else if(b>a) c2++;

        }

        cout<<c1<<" "<<c2<<endl;

    }





    return 0;


}


Post a Comment

0 Comments